package com.alcj.service.impl;

import com.alcj.mapper.AddressMapper;
import com.alcj.mapper.OrderMapper;
import com.alcj.model.Address;
import com.alcj.model.Order;
import com.alcj.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    OrderMapper orderMapper;
    @Autowired
    AddressMapper addressMapper;

    /**
     * @param orderId 订单ID
     * @return Order 订单详细信息
     * @Author: LiuChen
     * @Description: 根据订单ID获得相关订单信息
     */
    @Override
    public Order selectByPrimaryKey(String orderId) {
        return orderMapper.selectByPrimaryKey(orderId);
    }

    @Override
    public int updateByPrimaryKeySelective(Order record) {
        return this.orderMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public Address selectByOperaId(String operaid) {
        return this.addressMapper.selectByOperaId(operaid);
    }
}
